<html>
<head>
    <meta charset="utf-8">
    <title>接口文档</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <link rel="stylesheet" href="{$assets}/layui/css/layui.css">
    <link rel="stylesheet" href="{$assets}/style.css">
    {block name="head"}{/block}
</head>
<body>
{block name="header"}
{/block}

{block name="main"}
<div class="layui-main site-inline">
    {include file="left" /}
    <div class="site-content">
        {block name="content"}{/block}
    </div>
</div>
{/block}
{block name="footer"}
{include file="footer" /}
{/block}

<script src="{$assets}/layui/layui.js"></script>

<script>
layui.use(['element', 'layer', 'form', 'code'], function () {
  var element = layui.element
      , layer = layui.layer
      , $ = layui.jquery
      , form = layui.form;


  form.on('select(component)', function (item) {
      window.location.href = item.value;
  });

  layui.code({
      elem: 'pre' //默认值为.layui-code
      , title: 'ThinkPHP 5'
      , encode: true
      , about: false
  });

  //显示当前tab
  if (location.hash) {
      element.tabChange('doc', location.hash.replace(/^#/, ''));
  }
  element.on('tab(doc)', function () {
      var othis = $(this), layid = othis.attr('lay-id');
      if (layid) {
          location.hash = layid;
      }
  });
  form.on('select(tabVersion)', function (e) {
      window.location.href = "/doc/document?name=explain&version=" + e.value
  });
  
  $('.showK').click(function(){
    var k = $(this).attr('val');
    console.info(k);
    
    var tmpK = $('.show' + k);
    
    $('.show0').hide();
    tmpK.show();
    
    
    $('.showK').removeClass('on');
    $('.showK'+k).addClass('on');
    
    
  });
  
  var k = {$theShowK};
  if(k > 0){
    var tmpK = $('.show' + k);
    tmpK.show();
    
    $('.showK'+k).addClass('on');
    
  }
  
  
});
</script>
{block name='js'}
{/block}
</body>
</html>